<template>
	<view class="cardbox">
		<view class="cardlist" v-for="(item,index) in cardlist" :key="index">
			<image :src="item.img" class="cardimg"></image>
			<view class="cartfont">
				<text class="carttext">{{item.text}}</text>
				<text class="cartdetail">{{item.detail}}</text>
			</view>
		</view>
		
	</view>
</template>

<script>
	import goods from '@/json/goods.json'
	export default {
		data() {
			return {
cardlist:[]  //数组
			}
		},
		methods: {

		},
		created() {
			this.cardlist=goods.cardlist
		}
	}
</script>

<style>
	.cardbox{display: flex;flex-wrap:wrap ;}
	.cardlist {
		display: flex;
		align-items: center;
		width: 50%;
		padding-left: 10px;
		height: 70px;
		border-bottom: 1px solid #ccc;
		border-right: 1px solid #ccc;
		box-sizing: border-box;
	}

	.cardimg {
		width: 40px;
		height: 40px;
	}

	.cartfont {
		display: flex;
		flex-direction: column;
		margin-left: 5px;
	}
.carttext{font-size: 14px}
	.cartdetail {
		font-size: 12px;
		color: #ccc;
	}
</style>
